const Config = require('@/config/base_config')
const {getHeaderHeight} = require('@/utils/util.js')
App({
  onLaunch() {
    console.log("APP Launch");
    wx.onMemoryWarning(() => {
      console.log('内存警告触发');
    });
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    baseUrl: Config.API_HOST, // 开发环境
    userInfo: null
  }
})